package com.cuijq.ms.observer.v2;

/**
 * @author by CuiJQ
 * @Classname UserController
 * @Description UserController Description
 * @Date 2021/5/28 15:17
 */
public class UserController {

  private UserService userService; // 依赖注入
  private PromotionService promotionService; // 依赖注入

  public Long register(String telephone, String password) {
    //省略输入参数的校验代码 //省略userService.register()异常的try-catch代码
    long userId = userService.register(telephone, password);
    promotionService.issueNewUserExperienceCash(userId);
    return userId;
  }
}
